package com.banksystem.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.banksystem.entity.Group;

public interface Groupmapper {

	@Select("select * from groupp where uname=#{uname}")
	public Group findstxxAll(@Param("uname")String uname);
	
	@Select("select * from groupp")
	public List<Group> findstxxadmin();
	
	@Delete("delete from groupp where gid=#{gid}")
	public void detelest(@Param("gid")String gid);
	
	@Select("select * from groupp where  name like'%${seach}%' or gid like'%${seach}%' or type like'%${seach}%'")
	public List<Group> findgroup(@Param("seach")String seach);
	
	@Select("insert into groupp ( name, type, date , master, phone, uname, password, intro) values (#{name},#{type},#{date},#{master},#{phone},#{uname},#{password},#{intro})")
	public void addst(@Param("name")String name,@Param("type")String type,@Param("date")String date ,@Param("master")String master,@Param("phone")String phone,@Param("uname")String uname,@Param("password")String password,@Param("intro")String intro);
	
	@Select("insert into userinfo (uname,upwd,role) values (#{uname},#{password},#{role})")
	public void addstuser(@Param("uname")String uname,@Param("password")String password,@Param("role")String role);
}
